﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Runda.CMS.Bll;
using Runda.CMS.Common.Utility;
using Runda.CMS.Common.Entity;
namespace Runda.CMS.Portal.Finiance
{
    public partial class CustomerAgingAccountList : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if(Request.QueryString["CustomerID"] != null && Request.QueryString["CustomerID"].ToString() !="")
                {
                    txtCustomerID.Value = Request.QueryString["CustomerID"];
                    BindCustomerList(1);
                }
            }
        }
        private void BindCustomerList(int pageindex)
        {             
            List<ArmCustomerAgeEntity> list = new SysUserBll().GetAll<ArmCustomerAgeEntity>(" and CustomerID='" + txtCustomerID.Value + "'");
            RepeaterUsers.DataSource = list;
            RepeaterUsers.DataBind();            
        }

        protected void RepeaterUsers_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "refersh")
            {
                BindCustomerList(1);
            }
        }
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {

        }       

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            BindCustomerList(1);
        } 
    }
}
